#!/usr/bin/perl -w
use strict;
use warnings;
require('config.pl');

my $group_size = 100;
my $group_num = 7;
my $total_spider_num = $group_size * $group_num;

for (my $i = ($ENV{'spider_index'} - 1) * $group_size; $i < $ENV{'spider_index'} * $group_size; ++$i) {
	`nohup ./baidu_wap_spider.pl $total_spider_num $i >>data/baidu_wap_spider 2>>log/baidu_wap_spider.log &`;
	`nohup ./baidu_wap_spider.pl $total_spider_num $i >>data/baidu_wap_spider 2>>log/baidu_wap_spider.log &`;
}

#	ps aux | grep baidu_wap_spider | grep -v grep | awk '{print $2}' | xargs kill
